// Check for duplicates bool isDuplicate = ExistingList.Any(r => r.Name == textBox.Name); if (isDuplicate) { MessageBox.Show("Name already Exists"); return; }